<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		Broadcastweb.eu - Paules												/
/	Site:			http://www.broadcastweb.eu												/
/	Email:			support@broadcastweb.eu													/
/	Copyright:		2011 - 2012 (c) Broadcastweb.eu											/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0003																	/
/																							/
/========================================== JooSam ========================================*/

// Joomla security
defined('_JEXEC') or die;

## Import Joomla Data
JHtml::_('behavior.tooltip');
$srvActive = $this->srvActive;
$srvOnEdit = $this->srvOnEdit;
?>
<fieldset class="jsm_fieldset" style="float:left; width:78%;">
	<legend><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_003'); ?></legend>
	<?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_004'); ?>
</fieldset>
<table class="jsmRight" style="float:right;min-width:120px;border:none;margin:0 0 10px 10px;padding:0;">
	<tr>
		<th class="jsm_TableHead" colspan="2" style="font-size:13px; color:#0080ff;"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_005'); ?></th>
	<tr>
		<td class="jsm_label" style="font-size:11px; font-weight:bold; width:90px;"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_006'); ?>: </td>
		<td class="jsm_value" style="font-size:12px; color:#ff8000; font-weight:bold;"><?php echo $srvActive['name']; ?></td>
	</tr>
	<tr>
		<td class="jsm_label" style="font-size:11px; font-weight:bold; width:90px;"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_007'); ?>: </td>
		<td class="jsm_value" style="font-size:12px; color:#ff8000; font-weight:bold;"><?php echo $srvOnEdit['name']; ?></td>
	</tr>
</table>
<div class="clr"></div>
<!-- Form start -->
<form action="<?php echo JRoute::_('index.php?option=com_joosam&view=reqevts'); ?>" method="post" name="adminForm" id="adminForm">
	<fieldset class="jsm_fieldset">
		<table class="adminlist">
			<thead>
				<tr>
					<th width="35"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_008'); ?></th>
					<th width="150"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_009'); ?></th>
					<th width="200"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_010'); ?></th>
					<th width="200"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_011'); ?></th>
					<th><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_012'); ?></th>
				</tr>
			</thead>
			<tbody>
				<?php if(is_array($this->items) and array_key_exists('0', $this->items)):
					foreach($this->items as $i => $item):
						
						if($item->auto_update == 1){
							$update = '<span class="jsm_dayPreview" style="font-weight:bold;">'.JText::_('COM_JOOSAM_VIEWS_REQEVTS_013').'</span>';
							if($item->evt_day_mon){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_014').'</span>';}
							if($item->evt_day_tue){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_015').'</span>';}
							if($item->evt_day_wed){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_016').'</span>';}
							if($item->evt_day_thu){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_017').'</span>';}
							if($item->evt_day_fri){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_018').'</span>';}
							if($item->evt_day_sat){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_019').'</span>';}
							if($item->evt_day_sun){$update .= '<span class="jsm_dayPreview"> '.JText::_('COM_JOOSAM_VIEWS_REQEVTS_020').'</span>';}
						}
						else if($item->auto_update == 2){
							$update = '<span class="jsm_dayPreview">'.JText::_('COM_JOOSAM_VIEWS_REQEVTS_021').'</span>';
						}
						else{
							$update = '<span class="jsm_dayPreview">'.JText::_('COM_JOOSAM_VIEWS_REQEVTS_022').'</span>';
						}?>


						<tr class="row<?php echo $i % 2; ?>">
					<!--1--><td style="text-align:center; padding:0 0 0 15px;">
								<?php echo JHtml::_('grid.id', $i, $item->id); ?>
							</td>
					<!--2--><td class="center">
								<?php echo $item->evt_name; ?>
							</td>
					<!--3--><td class="center">
								<?php echo $item->view_songtype; ?>
							</td>
					<!--4--><td>
								<?php echo $update; ?>
							</td>
					<!--5--><td>
								<?php echo $item->evt_description; ?>
							</td>
						</tr>
					<?php endforeach;
				else: ?>
					<tr>
						<td class="jsm_nodata" colspan="5" style="text-align:center;"><?php echo JText::_('COM_JOOSAM_VIEWS_REQEVTS_023'); ?></td>
					</tr><?php
				endif; ?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="5"><?php
							if(is_array($this->items)):
							echo $this->pagination->getListFooter();
							endif;
						?>
					</td>
				</tr>
			</tfoot>
		</table>
	</fieldset>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
<div class="clr"></div>